using System;
using System.Collections.Generic;
using System.Text;

namespace Christian.Helle.PocketNews.PocketPC.NewsProtocol
{
	/// <summary>
	/// Containing Details about one newsgroup
	/// </summary>
	public class Newsgroup
	{
		/// <summary>
		/// Default Constructors with no arguments cannot be called by the user
		/// </summary>
		private Newsgroup()
		{ }
		/// <summary>
		/// Conversion Constructor for the class
		/// </summary>
		/// <param name="groupName">Name of the Newsgroup</param>
		public Newsgroup(string groupName)
		{
			this.GroupName = groupName;
			this.NumberPosts = 0;
			this.Low = 0;
			this.High = 0;
		}

		/// <summary>
		/// Constructor for the Newsgroup class
		/// </summary>
		/// <param name="groupName">Name of the Newsgroup</param>
		/// <param name="numberPosts">Estimated number of posts</param>
		public Newsgroup(string groupName, int numberPosts)
		{
			this.GroupName = groupName;
			this.NumberPosts = numberPosts;
			this.Low = 0;
			this.High = 0;
		}

		/// <summary>
		/// General Constructor for the Newsgroup class
		/// </summary>
		/// <param name="groupName">Name of the Newsgroup</param>
		/// <param name="numberPosts">Estimated number of posts</param>
		/// <param name="low">low watermark</param>
		/// <param name="high">high watermark</param>
		public Newsgroup(string groupName, int numberPosts, int low, int high)
		{
			this.GroupName = groupName;
			this.NumberPosts = numberPosts;
			this.Low = low;
			this.High = high;
		}

		#region Public Properties

		/// <summary>
		/// Gets / Sets the Newsgroup Name
		/// </summary>
		public string GroupName;
		/// <summary>
		/// Gets / Sets the Estimated Number of Posts
		/// </summary>
		public int NumberPosts;
		/// <summary>
		/// Gets / Sets the low watermark for the newsgroup
		/// </summary>
		public int Low;
		/// <summary>
		/// Gets / Sets the high watermark of the newsgroup
		/// </summary>
		public int High;
		/// <summary>
		/// Gets / Sets the subscription status of this newsgroup
		/// </summary>
		public bool Subscribed;

		#endregion
	}
}
